package com.jzo2o.health.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzo2o.api.orders.dto.response.OrderResDTO;
import com.jzo2o.api.trade.dto.response.ExecutionResultResDTO;
import com.jzo2o.health.model.domain.Orders;
import com.jzo2o.health.model.domain.OrdersRefund;
import com.jzo2o.health.model.dto.response.OrderCancelDTO;
import com.jzo2o.health.model.dto.response.OrderUpdateStatusDTO;

import java.util.List;

/**
 * <p>
 * 订单取消
 * </p>
 *
 * @author itcast
 * @since 2023-11-02
 */
public interface IOrdersManagerService extends IService<Orders> {
    /**
     * 手动取消订单
     * @param orderCancelDTO
     */
    void cancel(OrderCancelDTO orderCancelDTO);
    /**
     * 取消未支付的订单
     * @param dto
     */
    void cancelNoPayOrder(OrderCancelDTO dto);

    Integer updateStatus(OrderUpdateStatusDTO orderUpdateStatusReqDTO);

    /**
     * 取消派单中的订单
     */
    void cancelDispatchingOrder(OrderCancelDTO dto);

    /**
     * 请求退款
     * @param ordersRefund
     */
    void requestRefundOrder(OrdersRefund ordersRefund);

    /**
     * 订单退款
     */
    void refundOrder(OrdersRefund ordersRefund, ExecutionResultResDTO executionResultResDTO);

    /**
     * 查询超时订单id列表
     *
     * @param count 数量
     * @return 订单id列表
     */
    List<Orders> queryOverTimePayOrdersListByCount(Integer count);


    OrderResDTO getDetail(Long id);

    Orders queryById(Long id);

}
